class Hero:
    def __init__(self, name, attack_val, hp, tags, speed,
                 position_x, position_y):
        self.name = name
        self.attack_val = attack_val
        self.hp = hp
        self.tags = tags
        self.speed = speed
        self.position_x = position_x
        self.position_y = position_y

    def attack(self, another):
        print("开始时:another.hp={}".format(another.hp))
        another.hp -= self.attack_val
        print("结束时:another.hp={}".format(another.hp))

    def move(self, x, y):
        print("开始的位置({},{})"
              .format(self.position_x, self.position_y))
        self.position_x += x
        self.position_y += y
        print("结束的位置({},{})"
              .format(self.position_x, self.position_y))


cyj = Hero("程咬金", 100, 1000, ['战士', '坦克'], 20, 100, 200)
zy = Hero("赵云", 120, 800, ['战士', '刺客'], 20, 100, 200)

zy.attack(cyj)
zy.move(-1, 12)
